<script setup>
import chooseList from './components/chooseList.vue';
import midInput from './components/midInput.vue';
import newinput from './components/newinput.vue';
import { ref } from 'vue';
const messageFromChild = ref('');
const messageFromChild2 = ref('');
const xx = ref("sd")
const receiveMessageFromChild = (message) => {
  nowPage.value=2
  messageFromChild.value = message;
}
const receiveMessageFromChild2 = (message) => {
  nowPage.value=3
  messageFromChild2.value = message;
}
const backFromChild =(message)=>{
  nowPage.value=1
}
const nowPage = ref(1)
</script>

<template>
  <div class="mainBody">
    <p>创建渠道表单</p>
    <chooseList :message="nowPage"/>
    <midInput @addEvent="receiveMessageFromChild" v-if="nowPage == 1"  />
    <newinput @addEventT="receiveMessageFromChild2" @back="backFromChild" v-if="nowPage == 2"/>
    <p>{{ messageFromChild }}</p>
    <p>{{ messageFromChild2 }}</p>
    <a href="tel:18666275538">12312</a>
  </div>

</template>

<style>
.mainBody{
  height: 600px;
  border: 1px solid #000;
  min-width: 1080px;
}
</style>